Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

services: allow some slippage in TestNotary #3396

Merged
merged 1 commit into from
Apr 3, 2024
Merged

Conversation

AnnaShaleva
Copy link
Member

  1. Allow 1-block slippage for multisignature request block generation to ensure that PostPersist for fb's NVB-th block is properly finished.
  2. Allow 1-block slippage before sent request checks to ensure that PostPersist for NVB fb's NVB-th block was finished and all stale mains were properly marked by Notary service.

Overall, this commits ports the approach of #3390 to the whole test.

Close #3366.

1. Allow 1-block slippage for multisignature request block generation to
   ensure that PostPersist for fb's NVB-th block is properly finished.
2. Allow 1-block slippage before sent request checks to ensure that
   PostPersist for NVB fb's NVB-th block was finished and all
   stale mains were properly marked by Notary service.

Overall, this commits ports the approach of #3390 to the whole test.

Close #3366.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.85%. Comparing base (be1b97d) to head (4c28872).
Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3396       +/-   ##
===========================================
+ Coverage        0   84.85%   +84.85%     
===========================================
  Files           0      331      +331     
  Lines           0    44968    +44968     
===========================================
+ Hits            0    38157    +38157     
- Misses          0     5295     +5295     
- Partials        0     1516     +1516     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess everyone loves this test now

@roman-khimov roman-khimov merged commit f690180 into master Apr 3, 2024
19 of 20 checks passed
@roman-khimov roman-khimov deleted the fix-TestNotary branch April 3, 2024 20:26
AnnaShaleva added a commit that referenced this pull request Apr 4, 2024
Close #2956. The failure reason is similar to the one described in #3396
for TestNotary: Blockchain's notificationDispatcher is listening to
block events from storeBlock via separate channel. By the moment single
block addition is finished, notification may or may not be properly
handled by notificationDispatcher, especially given the fact that our
runners are slow. As a result, assert.Eventually with 1-second awaiting
period may fail. This issue is solved by adding one more block, because
the second AddBlock finishes only when it sends block addition event to
notificationDispatcher loop, which means that the previous event was
handled.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
AnnaShaleva added a commit that referenced this pull request Apr 4, 2024
Close #2956. The failure reason is similar to the one described in #3396
for TestNotary: Blockchain's notificationDispatcher is listening to
block events from storeBlock via separate channel. By the moment single
block addition is finished, notification may or may not be properly
handled by notificationDispatcher, especially given the fact that our
runners are slow. As a result, assert.Eventually with 1-second awaiting
period may fail. This issue is solved by adding one more block, because
the second AddBlock finishes only when it sends block addition event to
notificationDispatcher loop, which means that the previous event was
handled.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestNotary ubuntu fails
2 participants